package com.qf.ithub.movie_demo01.mapper;

import com.qf.ithub.movie_demo01.entity.ActionRight;
import com.qf.ithub.movie_demo01.entity.ActionRightExample;
import java.util.List;

import com.qf.ithub.movie_demo01.entity.dto.ActionDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface ActionRightMapper {
    int countByExample(ActionRightExample example);

    int deleteByExample(ActionRightExample example);

    int deleteByPrimaryKey(Integer rightid);

    int insert(ActionRight record);

    int insertSelective(ActionRight record);

    List<ActionRight> selectByExample(ActionRightExample example);

    ActionRight selectByPrimaryKey(Integer rightid);

    int updateByExampleSelective(@Param("record") ActionRight record, @Param("example") ActionRightExample example);

    int updateByExample(@Param("record") ActionRight record, @Param("example") ActionRightExample example);

    int updateByPrimaryKeySelective(ActionRight record);

    int updateByPrimaryKey(ActionRight record);

    //    获得所有的动作权限
    List<ActionDTO> selectAllActionRightByParentid(@Param("parentid") Integer parentid);
    //除父节点外所有的动作权限
    List<Integer> selectActionRightByRolNoParent  (@Param("roleid") Integer roleid);
}